package com.teen9g.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 粉丝和关注关系表
 * <p>绑定关系：{@code fansId → followsId}</p>
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("fans_and_follows")
public class FansAndFollows implements Serializable {
    @TableId(value = "track_id", type = IdType.AUTO)
    private Integer trackId; //记录id
    private Integer fansId; //粉丝id
    private String fansUserName; //粉丝用户名
    private Integer followsId; //被关注的id
    private String followsUserName; //被关注的用户名
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime trackTime; //关注时间
}
